package com.pms.servlet;

import java.io.IOException;


import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.pms.entity.Document;
import com.pms.service.NewDocumentService;


public class ToDocumentShow extends HttpServlet {

	private static final long serialVersionUID = 1L;

	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		request.setCharacterEncoding("utf-8");
		String docid=request.getParameter("docid");
		
		
		Document doc=new NewDocumentService().findById(docid);
		request.setAttribute("doc", doc);
		request.getRequestDispatcher("/WEB-INF/documentShow.jsp").forward(request, response);
	}

}
